x86/vioapic: allow holes in the GSI range for PVH Dom0
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 19 Apr 2017 11:29:51 +0000 (13:29 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 19 Apr 2017 11:29:51 +0000 (13:29 +0200)
commit53e482266e8c552a47c1c14630b357dbedd86c3c
tree950e68e6a10982ad1ae3497ca540ca5470428ae3
parent8555a85a7a581f2263a81e0f4dc7dc24b0c38942
x86/vioapic: allow holes in the GSI range for PVH Dom0

The current vIO APIC for PVH Dom0 doesn't allow non-contiguous GSIs, which
means that all GSIs must belong to an IO APIC. This doesn't match reality,
where there are systems with non-contiguous GSIs.

In order to fix this add a base_gsi field to each hvm_vioapic struct, in order
to store the base GSI for each emulated IO APIC. For PVH Dom0 those values are
populated based on the hardware ones.

Reported-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Chao Gao <chao.gao@intel.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/x86/hvm/dom0_build.c
xen/arch/x86/hvm/vioapic.c
xen/include/asm-x86/hvm/vioapic.h